<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:choose>
    <c:when test="${ requestScope.error != null }">
      <div class="error active" id="info-notice">
            <span onclick="closeInfo(this)" id="close-info">❌</span>${ requestScope.error }
        </div>
        <script type="text/javascript">
            function closeInfo(e) {
                e.parentNode.classList.remove("active");
            }
            setInterval(() => {
                document.getElementById("info-notice").classList.remove("active")
            }, 4000);
        </script>
    </c:when>
    <c:when test="${ requestScope.warn != null }">
        <div class="warn active" id="info-notice">
            <span onclick="closeInfo(this)" id="close-info">❌</span>${ requestScope.warn }
        </div>
        <script type="text/javascript">
            function closeInfo(e) {
                e.parentNode.classList.remove("active");
            }
            setInterval(() => {
                document.getElementById("info-notice").classList.remove("active")
            }, 4000);
        </script>
    </c:when>
    <c:when test="${ requestScope.success != null }">
        <div class="success active" id="info-notice">
            <span onclick="closeInfo(this)" id="close-info">❌</span>${ requestScope.success }
        </div>
        <script type="text/javascript">
            function closeInfo(e) {
                e.parentNode.classList.remove("active");
            }
            setInterval(() => {
                document.getElementById("info-notice").classList.remove("active")
            }, 4000);
        </script>
    </c:when>
</c:choose>
